public class test1 {
    public static void main(String[] args) {

        Person person = new Person("陈袜子", 30, "男", 70.5);
        Teacher teacher = new Teacher("茂袜子", 40, "女", 80.2, "教授");
        Stu student = new Stu("贾其杨", 20, "男", 60.3, "北京大学");

        person.showInfo();
        teacher.showInfo();
        student.showInfo();

    }
}
class Person{
    String name;
    int age;
    double weight;
    String sex;
    Person(String name,int age,String sex,double weight){
        this.name = name;
        this.age = age;
        this.sex = sex;
        this.weight = weight;
    }
    public void  showInfo(){
        System.out.println(name+age+sex+weight);
    }
}
class Teacher extends Person{
    public String post;
    Teacher(String name, int age, String sex, double weight, String post) {
        super(name, age, sex, weight);
        this.post = post;
    }
    public void showInfo(){
        System.out.println(name+age+sex+weight+post);
    }
}
class Stu extends Person{
    public String school;
    Stu(String name, int age, String sex, double weight,String school) {
        super(name, age, sex,weight);
        this.school = school;
    }
    public void showInfo(){
        System.out.println(name+age+sex+weight+school);
    }
}